<?php
require_once 'conf/verifica.php';
require_once 'Pelicula.php';
require_once 'Director.php';
require_once 'Categoria.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GestionDVD - Home</title>
<link rel="shortcut icon" href="images/icono.ico" />
<link type="text/css" rel="stylesheet" href="css/calendar.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="css/estilo.css" />
<script type="text/javascript" src="scripts/calendar.js"></script>
<script type="text/javascript" src="scripts/scripts.js"></script>
<script type="text/javascript" src="scripts/ultimo.js"></script> 
</head>

<body>
<div id="mainContainer">
<?php require("conf/menu.html"); ?>
<?php
    if(isset($_GET["PID"])) {
        $pel = new Pelicula();
        $pel->Buscar($_GET["PID"]);
        $cat = new Categoria();
        $cat->Buscar($pel->cid);
        $dir = new Director();
        $dir->Buscar($pel->did);
    }
?>
<form id="form1" name="form1" method="post" action="">
  <table width="298" border="1" align="center" class="primary">
    <tr>
      <td colspan="2"><div align="center">Ficha Pelicula</div></td>
    </tr>
    <tr>
      <td width="105">Nombre</td>
      <td width="177"><?php echo $pel->nombre; ?></td>
    </tr>
    <tr>
      <td>Categoria</td>
      <td><?php echo $cat->nombre; ?></td>
    </tr>
    <tr>
      <td>Director</td>
      <td><?php echo $dir->nom; ?></td>
    </tr>
    <tr>
      <td>Fecha Estreno</td>
      <td><?php echo getFechaNormal($pel->f_estreno); ?></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
</div>
</body>
</html>